package com.chunya.nacos.client.config;

import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "weather.city")
@RefreshScope
@Component
public class WeatherConfig {
    private String chengdu;
    private String shanghai;

    private String guangzhou;

    public String getChengdu() {
        return chengdu;
    }

    public void setChengdu(String chengdu) {
        this.chengdu = chengdu;
    }

    public String getShanghai() {
        return shanghai;
    }

    public void setShanghai(String shanghai) {
        this.shanghai = shanghai;
    }

    public String getGuangzhou() {
        return guangzhou;
    }

    public void setGuangzhou(String guangzhou) {
        this.guangzhou = guangzhou;
    }

    public String getWeather() {
        return chengdu + "\r\n" + shanghai + "\r\n" + guangzhou;
    }

}
